<template>
	<div class="right_bottom">
		<dv-scroll-board :config="config" style="width: 100%; height: 260px" />
	</div>
</template>

<script>
import { getrevenueRanking } from '@/api/modules/home.js'
export default {
	name: 'sypm',
	data() {
		return {
			gatewayno: '',
			config: {
				// headerBGC:"rgba(51, 187, 255, 0.20)",
				// oddRowBGC:"rgba(17, 106, 229, 0.36)",
				// evenRowBGC:"rgba(51, 187, 255, 0.04)",
				header: ['站点名称', '收益（万元）'],
				data: [],
				indexHeader: '排名',
				// columnWidth:['21px','100px','100px'],
				index: true,
				align: ['center', 'center', 'center'],
			},
		}
	},
	created() {
		this.getData()
	},
	computed: {},
	mounted() {},
	beforeDestroy() {},
	methods: {
		getData() {
			getrevenueRanking({
				companyID: this.$store.state.oldUserInfo.companyId,
			}).then((res) => {
				if (res.code == 200) {
					let data = res.data
					let arr1 = []
					for (let index = 0; index < data.length; index++) {
						const cname = data[index]['cname']
						const incomeAllday = data[index]['incomeAllday']
						arr1.push([cname, incomeAllday])
					}
					this.config = { ...this.config, data: arr1 }
				}
			})
		},
	},
}
</script>
<style lang="scss" scoped>
.list_Wrap {
	height: 100%;
	overflow: hidden;

	:deep(.kong) {
		width: auto;
	}
}

.sbtxSwiperclass {
	.img_wrap {
		overflow-x: auto;
	}
}

.right_bottom {
	box-sizing: border-box;
	padding: 8px 13px;

	.searchform {
		height: 80px;
		display: flex;
		align-items: center;
		justify-content: center;

		.searchform_item {
			display: flex;
			justify-content: center;
			align-items: center;

			label {
				margin-right: 10px;
				color: rgba(255, 255, 255, 0.8);
			}

			button {
				margin-left: 30px;
			}

			input {
			}
		}
	}

	.img_wrap {
		display: flex;
		// justify-content: space-around;
		box-sizing: border-box;
		padding: 0 0 20px;
		// overflow-x: auto;

		li {
			width: 105px;
			height: 137px;
			border-radius: 6px;
			overflow: hidden;
			cursor: pointer;
			// background: #84ccc9;
			// border: 1px solid #ffffff;
			overflow: hidden;
			flex-shrink: 0;
			margin: 0 10px;

			img {
				flex-shrink: 0;
			}
		}
	}

	.noData {
		width: 100%;
		line-height: 100px;
		text-align: center;
		color: rgb(129, 128, 128);
	}
}
</style>
